<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main.tpl.homePage"><i class="fa fa-home"></i> 首页</a></li>
        <li class="active" ng-bind="title"></li>
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>

<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-body">
                <div class="form-group center">
                    <div class="col-md-1">
                        <label class="col-sm-1 control-label"><button class="ifc-btn btn-primary" TYPE="button" ng-click="showBackCash()">返现</button></label>
                    </div>
                    <div class="col-md-1">
                        <label class="col-sm-1 control-label"><button class="ifc-btn btn-dark" type="button" ng-click="back()">返回</button></label>
                    </div>
                </div>
            </div>
            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                        <th>广告主</th>
                        <th>返现金额</th>
                        <th>返现方式</th>
                        <th>已返现累计</th>
                        <th>未返现</th>
                        <th>返现时间</th>
                        <th>操作人</th>
                        <th>状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.records">
                        <td class="v-middle">{{item.companyName}}</td>
                        <td class="v-middle">{{item.backCash}}</td>
                        <td class="v-middle">
                            <span ng-if="item.cashType=='1'">蜂巢账户</span>
                            <span ng-if="item.cashType=='2'">金融账户</span>
                            <span ng-if="item.cashType=='3'">线下</span>
                        </td>
                        <td class="v-middle">
                            {{item.backCashSum}}
                        </td>
                        <td class="v-middle">{{item.noBackCash}}</td>
                        <td class="v-middle">{{item.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
                        <td class="v-middle">{{item.updatePer}}</td>

                        <td class="v-middle">
                            <span ng-if="item.state=='1'">待审核</span>
                            <span ng-if="item.state=='2'">返现成功</span>
                            <span ng-if="item.state=='3'">返现失败</span>
                        </td>

                    </tr>
                    </tbody>
                </table>
            </div><!-- /.table-responsive -->

            <!-- 底部分页 -->
            <span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div><!-- /.panel -->
    </div><!-- /.wrapper-data -->

    <form id="saveBackCash">
        <div class="modal fade" tabindex="-1" data-backdrop="static" id="backCash" role="dialog" aria-labelledby="gridSystemModalLabel">
            <div class="modal-dialog " role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="gridSystemModalLabel">返现</h4>
                    </div>
                    <div class="modal-body" id="RechargeBody">
                        <div class="row">
                            <label class="col-sm-3 control-label text-right">广告主:</label>
                            <label class="col-sm-6 control-label text-left">{{backCashInfo.Username}}</label>
                        </div>
                        <p></p>
                        <div class="row">
                            <label class="col-sm-3 control-label text-right">可返现金额:</label>
                            <label class="col-sm-6 control-label text-left">{{backCashInfo.cash}}</label>
                        </div>
                        <p></p>
                        <div class="row">
                            <label class="col-sm-3 control-label text-right">返现方式:</label>
                            <div class="col-sm-6">
                                <select class="form-control require" name="backType" data-title="返现方式" ng-model="backCashInfo.backType">
                                    <option value="">请选择返现方式</option>
                                    <option value="1">返蜂巢账户</option>
                                    <option value="2">返金融账户</option>
                                </select>
                            </div>
                        </div>
                        <p></p>
                        <div class="row">
                            <label class="col-sm-3 control-label text-right">本次返现金额:</label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control require number" data-max="{{backCashInfo.cash}}" data-maxtitle="不能大于可返现金额" name="backcash" placeholder="返现金额" data-title="返现金额" ng-model="backCashInfo.nowcash" ng-keyup="clearNoNum(backCashInfo,'nowcash')">
                            </div>
                        </div>

                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" ng-click="baskCash()">确定</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
    </form>

</div><!-- /.wrapper-md -->

<style>
    .cover {
        position: fixed;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 2000;
        top: 0;
        left: 0;
        /* display: none; */
    }

    .firstApplyWrap{
        width: 550px;
        height:280px;
        background: #fff;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        -webkit-transform: translate(-50%,-50%);
        -ms-transform: translate(-50%,-50%);
        -o-transform: translate(-50%,-50%);
        -moz-transform: translate(-50%,-50%);
        border-radius: 5px;
        overflow: hidden;
    }
    .firstApplyWrap .title{
        font-size: 18px;
        color:#333;
        padding:18px 36px 0 36px;
        text-align: center;
        line-height: 2em;
    }
    .firstApplyWrap .closeBtn,.finishData .closeBtn{
        font-size: 30px;
        padding:5px 10px 0 0;
        border-radius: 50%;
        color: #ccc;
        float: right;
        cursor: pointer;
    }
    .finishData .closeBtn{
        position: absolute;
        top:10px;
        right:10px;
    }
    .firstApplyWrap .bkgIcon{
        position: absolute;
        left: 54px;
        top:87px;
        font-size: 50px;
        color:#FFB136;
    }
    .firstApplyWrap .applyBtnWrap{
        position: absolute;
        bottom: -2px;
        width: 100%;
    }
    .firstApplyWrap .applyBtn{
        width: 50%;
        height:70px;
        line-height: 70px;
        background: #FFB135;
        font-size: 20px;
        text-align: center;
        color:#fff;
        cursor: pointer;
        float:left;
    }
    .firstApplyWrap .applyBtn:last-child{
        background: #5796FC;
    }
</style>
